package com.contract.spirit.ui.income

import androidx.lifecycle.MutableLiveData
import com.contract.commonlib.base.BaseViewModel
import com.contract.commonlib.http.ext.request
import com.contract.commonlib.http.status.ResultState
import com.contract.spirit.bean.entity.IncomeRecordInfo
import com.contract.spirit.func.net.rxApi

/**
 * @author: witness
 * created: 2021/9/28
 * desc:
 */
class IncomeViewModel : BaseViewModel() {
    var incomeDetaiRes = MutableLiveData<ResultState<List<IncomeRecordInfo>>>()
    fun accoutDetailList(page:Int){
        request({rxApi.accoutDetailList(page.toString())},
        incomeDetaiRes,
        incomeDetaiRes.value==null)
    }
}